<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增提醒')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-reminder-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">手机号码：</label>
                <div class="col-sm-8">
                    <input name="mobilePhone" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">用户姓名：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务ID：</label>
                <div class="col-sm-8">
                    <input name="businessId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务名称：</label>
                <div class="col-sm-8">
                    <input name="businessName" class="form-control" placeholder="VIP取消10元电视会员" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务类型：</label>
                <div class="col-sm-8">
                    <input name="businessType" class="form-control" type="text" value="增值业务">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">业务到期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">提醒类型：</label>
                <div class="col-sm-8">
                    <select name="reminderType" class="form-control m-b">
                        <option value="1">到期提醒</option>
                        <option value="2">退订提醒</option>
                        <option value="3">续费提醒</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">提醒渠道：</label>
                <div class="col-sm-8">
                    <select name="channel" class="form-control m-b">
                        <option value="0">企业微信</option>
                        <option value="1" selected>短信</option>
                        <option value="2">短信和企业微信</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">计划发送时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="planSendTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">提醒内容：</label>
                <div class="col-sm-8">
                    <textarea name="content" class="form-control"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "business/reminder"
        $("#form-reminder-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-reminder-add').serialize());
            }
        }

        $("input[name='endTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='planSendTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss",
            autoclose: true
        });
    </script>
</body>
</html> 